SlideShare a Scribd company logo
1 of 21
Parallel algorithms Parallel and Distributed Computing Wrocław, 07.05.2010 Paweł Duda
Parallel algorithm – definition A  parallel algorithm  is an algorithm that has been specifically written for execution on a computer with two or more processing units.
Parallel algorithms ,[object Object],[object Object]
Modelling algorithms 1 ,[object Object],[object Object],[object Object],[object Object]
Modelling algorithms 2 - PRAM ,[object Object],[object Object],[object Object],[object Object]
Modelling algorithms 3 - PRAM ,[object Object],[object Object]
Multiprocessor model
Parallel Algorithms ,[object Object]
Work-depth model How the cost of the algorithm can be calculated? Work - W Depth - D P = W/D –  PARALLELISM of the algorithm Picture:  Summing   16   numbers   on   a   tree.The   total   depth   (longest   chain   of   dependencies)   is   4   and   The   total   work   (number   of   operations)   is   15.
Mergesort ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Mergesort
General-purpose computing on graphics processing units (GPGPU) ,[object Object],[object Object],[object Object],Nvidia's Tesla GPGPU card
Matrix multiplication ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Search ,[object Object],[object Object],[object Object],procedure search(A) begin if(solution(A)) then score = eval(A); report solution and score else foreach child A(i) of A search (A(i)) endfor endif end
  Shortest-Path Algorithms ,[object Object],[object Object],[object Object],[object Object],Picture:   A simple directed graph,  G , and its adjacency matrix,  A .  
Floyd’s algorithm Floyd’s algorithm is  a graph analysis algorithm for finding shortest paths in a weighted graph . A single execution of the algorithm will find the shortest paths between  all  pairs of vertices.
parallel Floyd’s algorithm 1 ,[object Object],[object Object],[object Object],[object Object]
parallel Floyd’s algorithm 1 Parallel version of Floyd's algorithm based on a one-dimensional decomposition of the I matrix.  In  (a) , the data allocated to a single task are shaded: a contiguous block of rows. In  (b) , the data required by this task in the k th step of the algorithm are shaded: its own block and the k th row.  
parallel Floyd’s algorithm 2 ,[object Object],[object Object],[object Object]
parallel Floyd’s algorithm 2 Parallel Floyd  2 Parallel version of Floyd's algorithm based on a two-dimensional decomposition of the I matrix. In (a), the data allocated to a single task are shaded: a contiguous submatrix. In (b), the data required by this task in the k th step of the algorithm are shaded: its own block, and part of the k th row and column.  
Thank you for attention

More Related Content

What's hot (20)

Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault ToleranceParallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
Parallel Algorithms: Sort & Merge, Image Processing, Fault Tolerance
 
Parallel algorithms
Parallel algorithmsParallel algorithms
Parallel algorithms
 
Slide1
Slide1Slide1
Slide1
 
Matlab
Matlab Matlab
Matlab
 
Graph Matching
Graph MatchingGraph Matching
Graph Matching
 
Matlab for Electrical Engineers
Matlab for Electrical EngineersMatlab for Electrical Engineers
Matlab for Electrical Engineers
 
#1 designandanalysis of algo
#1 designandanalysis of algo#1 designandanalysis of algo
#1 designandanalysis of algo
 
Matlab Presentation
Matlab PresentationMatlab Presentation
Matlab Presentation
 
Introduction to Matlab
Introduction to MatlabIntroduction to Matlab
Introduction to Matlab
 
Fourier Transform Assignment Help
Fourier Transform Assignment HelpFourier Transform Assignment Help
Fourier Transform Assignment Help
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
Parallel quicksort cz. 1
Parallel quicksort cz. 1Parallel quicksort cz. 1
Parallel quicksort cz. 1
 
Programming in python
Programming in pythonProgramming in python
Programming in python
 
Matlab-Data types and operators
Matlab-Data types and operatorsMatlab-Data types and operators
Matlab-Data types and operators
 
MatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On PlottingMatLab Basic Tutorial On Plotting
MatLab Basic Tutorial On Plotting
 
Introduction to MATLAB
Introduction to MATLABIntroduction to MATLAB
Introduction to MATLAB
 
Polymath For Chemical Engineers
Polymath For Chemical EngineersPolymath For Chemical Engineers
Polymath For Chemical Engineers
 
Introduction to Cache-Oblivious Algorithms
Introduction to Cache-Oblivious AlgorithmsIntroduction to Cache-Oblivious Algorithms
Introduction to Cache-Oblivious Algorithms
 

Viewers also liked

Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Dr Sandeep Kumar Poonia
 
Anotaciones semanticas
Anotaciones semanticasAnotaciones semanticas
Anotaciones semanticasMartin Coronel
 
Presentacion Proyecto Multiprocesamiento
Presentacion Proyecto MultiprocesamientoPresentacion Proyecto Multiprocesamiento
Presentacion Proyecto MultiprocesamientoMartin Coronel
 
Enhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmEnhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmDr Sandeep Kumar Poonia
 
Modified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmModified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmDr Sandeep Kumar Poonia
 
Parallel Algorithm Models
Parallel Algorithm ModelsParallel Algorithm Models
Parallel Algorithm ModelsMartin Coronel
 
An improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmAn improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmDr Sandeep Kumar Poonia
 
Parallel Algorithms Advantages and Disadvantages
Parallel Algorithms Advantages and DisadvantagesParallel Algorithms Advantages and Disadvantages
Parallel Algorithms Advantages and DisadvantagesMurtadha Alsabbagh
 
Bus Interfacing with Intel Microprocessors Based Systems
Bus Interfacing with Intel Microprocessors Based SystemsBus Interfacing with Intel Microprocessors Based Systems
Bus Interfacing with Intel Microprocessors Based SystemsMurtadha Alsabbagh
 

Viewers also liked (20)

Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...Performance evaluation of diff routing protocols in wsn using difft network p...
Performance evaluation of diff routing protocols in wsn using difft network p...
 
Anotaciones semanticas
Anotaciones semanticasAnotaciones semanticas
Anotaciones semanticas
 
Parallel sorting
Parallel sortingParallel sorting
Parallel sorting
 
parallel Merging
parallel Mergingparallel Merging
parallel Merging
 
Presentacion Proyecto Multiprocesamiento
Presentacion Proyecto MultiprocesamientoPresentacion Proyecto Multiprocesamiento
Presentacion Proyecto Multiprocesamiento
 
Enhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithmEnhanced local search in artificial bee colony algorithm
Enhanced local search in artificial bee colony algorithm
 
Modified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithmModified position update in spider monkey optimization algorithm
Modified position update in spider monkey optimization algorithm
 
RMABC
RMABCRMABC
RMABC
 
Parallel Algorithm Models
Parallel Algorithm ModelsParallel Algorithm Models
Parallel Algorithm Models
 
Introduction to algorithms
Introduction to algorithmsIntroduction to algorithms
Introduction to algorithms
 
Online exam series
Online exam seriesOnline exam series
Online exam series
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 
An improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithmAn improved memetic search in artificial bee colony algorithm
An improved memetic search in artificial bee colony algorithm
 
5 Pen PC Technology (P-ISM)
5 Pen PC Technology (P-ISM)5 Pen PC Technology (P-ISM)
5 Pen PC Technology (P-ISM)
 
Parallel Computing
Parallel Computing Parallel Computing
Parallel Computing
 
WSN Routing Protocols
WSN Routing ProtocolsWSN Routing Protocols
WSN Routing Protocols
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Parallel Algorithms Advantages and Disadvantages
Parallel Algorithms Advantages and DisadvantagesParallel Algorithms Advantages and Disadvantages
Parallel Algorithms Advantages and Disadvantages
 
Bus Interfacing with Intel Microprocessors Based Systems
Bus Interfacing with Intel Microprocessors Based SystemsBus Interfacing with Intel Microprocessors Based Systems
Bus Interfacing with Intel Microprocessors Based Systems
 
Multiprocessor system
Multiprocessor system Multiprocessor system
Multiprocessor system
 

Similar to Parallel algorithms

Algorithm chapter 1
Algorithm chapter 1Algorithm chapter 1
Algorithm chapter 1chidabdu
 
Parallel Computing 2007: Bring your own parallel application
Parallel Computing 2007: Bring your own parallel applicationParallel Computing 2007: Bring your own parallel application
Parallel Computing 2007: Bring your own parallel applicationGeoffrey Fox
 
complexity analysis.pdf
complexity analysis.pdfcomplexity analysis.pdf
complexity analysis.pdfpasinduneshan
 
Scheduling Using Multi Objective Genetic Algorithm
Scheduling Using Multi Objective Genetic AlgorithmScheduling Using Multi Objective Genetic Algorithm
Scheduling Using Multi Objective Genetic Algorithmiosrjce
 
Integrative Parallel Programming in HPC
Integrative Parallel Programming in HPCIntegrative Parallel Programming in HPC
Integrative Parallel Programming in HPCVictor Eijkhout
 
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEA NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEijscmcj
 
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEA NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEijscmc
 
IRJET- Latin Square Computation of Order-3 using Open CL
IRJET- Latin Square Computation of Order-3 using Open CLIRJET- Latin Square Computation of Order-3 using Open CL
IRJET- Latin Square Computation of Order-3 using Open CLIRJET Journal
 
VCE Unit 01 (2).pptx
VCE Unit 01 (2).pptxVCE Unit 01 (2).pptx
VCE Unit 01 (2).pptxskilljiolms
 
Oleksandr Frei and Murat Apishev - Parallel Non-blocking Deterministic Algori...
Oleksandr Frei and Murat Apishev - Parallel Non-blocking Deterministic Algori...Oleksandr Frei and Murat Apishev - Parallel Non-blocking Deterministic Algori...
Oleksandr Frei and Murat Apishev - Parallel Non-blocking Deterministic Algori...AIST
 

Similar to Parallel algorithms (20)

Gk3611601162
Gk3611601162Gk3611601162
Gk3611601162
 
Algorithm chapter 1
Algorithm chapter 1Algorithm chapter 1
Algorithm chapter 1
 
Parallel Computing 2007: Bring your own parallel application
Parallel Computing 2007: Bring your own parallel applicationParallel Computing 2007: Bring your own parallel application
Parallel Computing 2007: Bring your own parallel application
 
complexity analysis.pdf
complexity analysis.pdfcomplexity analysis.pdf
complexity analysis.pdf
 
Daa chapter 1
Daa chapter 1Daa chapter 1
Daa chapter 1
 
Chap10 slides
Chap10 slidesChap10 slides
Chap10 slides
 
M017327378
M017327378M017327378
M017327378
 
Scheduling Using Multi Objective Genetic Algorithm
Scheduling Using Multi Objective Genetic AlgorithmScheduling Using Multi Objective Genetic Algorithm
Scheduling Using Multi Objective Genetic Algorithm
 
1535 graph algorithms
1535 graph algorithms1535 graph algorithms
1535 graph algorithms
 
Cs2251 daa
Cs2251 daaCs2251 daa
Cs2251 daa
 
Fulltext
FulltextFulltext
Fulltext
 
Integrative Parallel Programming in HPC
Integrative Parallel Programming in HPCIntegrative Parallel Programming in HPC
Integrative Parallel Programming in HPC
 
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEA NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
 
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREEA NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
A NEW PARALLEL ALGORITHM FOR COMPUTING MINIMUM SPANNING TREE
 
IRJET- Latin Square Computation of Order-3 using Open CL
IRJET- Latin Square Computation of Order-3 using Open CLIRJET- Latin Square Computation of Order-3 using Open CL
IRJET- Latin Square Computation of Order-3 using Open CL
 
Design & Analysis Of Algorithm
Design & Analysis Of AlgorithmDesign & Analysis Of Algorithm
Design & Analysis Of Algorithm
 
VCE Unit 01 (2).pptx
VCE Unit 01 (2).pptxVCE Unit 01 (2).pptx
VCE Unit 01 (2).pptx
 
Bh36352357
Bh36352357Bh36352357
Bh36352357
 
chapter 1
chapter 1chapter 1
chapter 1
 
Oleksandr Frei and Murat Apishev - Parallel Non-blocking Deterministic Algori...
Oleksandr Frei and Murat Apishev - Parallel Non-blocking Deterministic Algori...Oleksandr Frei and Murat Apishev - Parallel Non-blocking Deterministic Algori...
Oleksandr Frei and Murat Apishev - Parallel Non-blocking Deterministic Algori...
 

Parallel algorithms

  • 1. Parallel algorithms Parallel and Distributed Computing Wrocław, 07.05.2010 Paweł Duda
  • 2. Parallel algorithm – definition A parallel algorithm is an algorithm that has been specifically written for execution on a computer with two or more processing units.
  • 3.
  • 4.
  • 5.
  • 6.
  • 8.
  • 9. Work-depth model How the cost of the algorithm can be calculated? Work - W Depth - D P = W/D – PARALLELISM of the algorithm Picture: Summing 16 numbers on a tree.The total depth (longest chain of dependencies) is 4 and The total work (number of operations) is 15.
  • 10.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16. Floyd’s algorithm Floyd’s algorithm is a graph analysis algorithm for finding shortest paths in a weighted graph . A single execution of the algorithm will find the shortest paths between  all  pairs of vertices.
  • 17.
  • 18. parallel Floyd’s algorithm 1 Parallel version of Floyd's algorithm based on a one-dimensional decomposition of the I matrix. In (a) , the data allocated to a single task are shaded: a contiguous block of rows. In (b) , the data required by this task in the k th step of the algorithm are shaded: its own block and the k th row.  
  • 19.
  • 20. parallel Floyd’s algorithm 2 Parallel Floyd 2 Parallel version of Floyd's algorithm based on a two-dimensional decomposition of the I matrix. In (a), the data allocated to a single task are shaded: a contiguous submatrix. In (b), the data required by this task in the k th step of the algorithm are shaded: its own block, and part of the k th row and column.  
  • 21. Thank you for attention

Editor's Notes

  1. A superscalar processor executes more than one instruction during a clock cycle by -> simultaneously dispatching multiple instructions to redundant functional units on the processor. -> Each functional unit is not a separate CPU core but an execution resource within a single CPU such as an  arithmetic logic unit , a bit shifter, or a  multiplier .
  2. RAM – for sequential algorithms CPU step like logical operations, memory accesses, arithmetic operations Model’s advantages – an algorithm’s designer can ignore details of machine the algorithm is executed on
  3. MIMD  (Multiple Instruction, Multiple Data)
  4. 1) Local A set of n processors each with its own local memory Processors connected to a common communication network Processor can access its own memory directly But also can access other’s processor memory, previously requesting it 2) Modular a)typically the modules (proc and mem) are arranged in the way that the access to memory is uniform for all processors b)the time depends on communication network and memory access pattern 3) PRAM a)processor can access any word of memory in a single step b) it’s just a model
  5. MIMD  (Multiple Instruction, Multiple Data)
  6. General-purpose computing on graphics processing units (GPGPU) is a fairly recent trend in computer engineering research. GPUs are co-processors that have been heavily optimized for computer graphics processing. Computer graphics processing is a field dominated by data parallel operations — particularly linear algebra matrix operations.
  7. Each circle represents a node in the search tree which is also a call to the search procedure. A task is created for each node in the tree as it is explored. At any one time, some tasks are actively engaged in expanding the tree further (these are shaded in the figure); others have reached solution nodes and are terminating, or are waiting for their offspring to report back with solutions. The lines represent the channels used to return solutions.  
  8.      We conclude this chapter by using performance models   to compare four different parallel algorithms for the all-pairs   shortest-path problem. This is an important problem in graph theory and has applications in communications, transportation, and electronics problems. It is interesting because analysis shows that three of the four algorithms can be optimal in different circumstances, depending on tradeoffs between computation and communication costs.